1. Field of the Invention
The invention relates generally to the field of DC motor control, and more particularly, to a method and apparatus for controlling a DC motor by counting current pulses.
2. Description of the Related Art
Direct current (DC) motors are widely used to generate motion in a variety of products. Products that require precise control of the motion typically include a control circuit that energizes the motor for a period of time based on a required amount of motion (motor rotation). Simple time based techniques typically result in wide variation in the amount of motion. Various factors, such as friction, battery voltage, load, etc., may change over time and affect the amount of travel that occurs for a given time. Accordingly, a feedback signal may be generated by attaching a tachometer, shaft encoder, position sensor, or the like to the motor shaft, gear shaft, or linear slide. The control circuit may use the feedback signal to adjust the run time of the motor for a desired amount of motion.
An exemplary application for a DC motor that requires motion control is a paper towel dispensing system. For sanitary reasons, many bathroom installations employ hands-free equipment for flushing toilets, dispensing water, dispensing soap, and/or dispensing paper toweling. A hands-free system reduces the likelihood that germs will transfer between users. A typical hands-free paper towel dispenser is a battery-operated unit with a DC motor that is activated by a proximity sensor. A motor controller controls the DC motor to dispense a predetermined amount of paper (e.g., 12 inches) for each activation of the proximity sensor. Variation in the amount of paper dispensed can increase material costs. For example, if too little paper is dispensed, a user may be inclined to activate the dispenser more than once, thus increasing paper usage. If the dispenser is not controlled accurately, and too much paper is dispensed, material costs again increase.
One known technique for generating a signal for controlling a DC motor involves counting pulses evident in the motor current. DC motors have a fixed number of field poles. Rotation of the motor causes a fixed number of motor current pulses per revolution. Accordingly, the number of pulses may be used to calculate the number of motor rotations, which may be converted to the amount of travel for the load attached to the motor based on the gear ratios of the mechanical linkages between the motor and the load.
One limitation of pulse counting techniques lies in the difficulty in counting pulses when the motor/load is not fully loaded. During the start cycle of a motor, the motor current is at its highest magnitude, and the motor pulses can be detected relatively easily. As the motor/load reaches a steady state speed, the current drops as the rotational force required from the motor drops due to the inertia of the motor/load. At lower motor currents, the pulses are less identifiable because the magnitude of the pulses is less. The effectiveness of the motor controller is reduced because pulses are missed. Increasing the frictional loading on the system to drive up motor current may not be an effective solution as it increases the loading on the motor and results in higher power consumption, a factor that may be significant in applications where the motor is powered by a battery.
Another limitation of pulse counting techniques is that motor pulses are not always detectable after a motor is turned off. For example, many control circuits employ field effect transistors to turn the motor on and off. While the motor is running the current passing through the transistor may be monitored to count the pulses. However, once the motor is turned off, the transistor isolates the motor and the pulses can no longer be monitored. In cases where a brake is provided or the frictional characteristics of the system are such that the motor load stops relatively quickly, the coasting time of the motor/load is reduced, and the additional travel of the motor/load after it is deactivated may not be significant. However, in cases where the coast time is significant, the feedback provided by the current pulses is not available, and the additional travel may hamper the effectiveness of the motor controller. Adding a brake to the system to reduce coast time adds cost to the drive system.
Accordingly, what is needed are techniques to control a DC motor using pulse counting techniques that account for low motor currents and/or motor coast intervals. The present invention is directed to overcoming, or at least reducing the effects of, one or more of the problems set forth above.